<template>
	<div class="SecretContent">
		<div class="Content">
				<div class="Cotent-from">
					<span>创建假条日期：</span><input type="text" v-model="NoteTime"><br>
					<span>申请人：</span><input type="text" v-model="My"><br>
					<span>审核人：</span><input type="text" v-model="Teacher"><br>
					<span>所属学院：</span><input type="text" v-model="College"><br>
					<span>班级： </span><input type="text" v-model="Class"><br>
					<span>假条开始日期：</span><input type="text" v-model="StartTime"><br>
					<span>假条结束日期：</span><input type="text" v-model="EndTime"><br>
				</div>
				<button type="button" @click="onButtonClick()">生成假条</button>
				<br>
				<div class="Content-tips">
					<span style="color: #409EFE;">日期格式：xxxx年x月x日 xx时xx分</span><br>
					<span style="color: crimson;">例如：2021年7月8日 11时41分</span>
				</div>
		</div>
	</div>
</template>

<script>
export default{
	data() {
		return{			
			NoteTime: '',
			My: '',
			Teacher: '',
			College: '',
			Class: '',
			StartTime: '',
			EndTime: '',
		}
	},
	methods:{
		onButtonClick(){
			this.$store.commit("LeaveData",{
					NoteTime: this.NoteTime,
					My: this.My,
					Teacher: this.Teacher,
					College: this.College,
					Class: this.Class,
					StartTime: this.StartTime,
					EndTime: this.EndTime,
					})
			console.log(localStorage.getItem("Leave"));
			alert('假条生成完毕！For freedom！:>');
			this.$router.push({path:'/Check'})
		}
		
	}
}
</script>

<style scoped="scoped">
.Content{
	font-size: .36rem;
	
}
.Cotent-from{
	margin-right: 10%;
	text-align: right;
}
.Content input{
	margin-top: .3rem;
	width: 4rem;
	height: .6rem;
	border: 1px solid black;
}
.Cotent-from span{
	color: #90939A;
}
.Content button{
	width: 6rem;
	height: .8rem;
	border: none;
	background: #409EFE;
	border-radius: .2rem;
	color: #ffffff;
	letter-spacing: .2rem;
	font-size: .36rem;
	margin-left: 1rem;
	margin-top: .5rem;
}
.Content-tips{
	margin-left: .5rem;
	margin-top: 1rem;
}
</style>
